#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <vector>

using namespace std;

struct ListNode {
    int val;
    ListNode* next;
    ListNode(int x) : val(x), next(NULL) {}
};

struct TreeNode {
    int val;
    TreeNode* left;
    TreeNode* right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};

class Solution {
   public:
    ListNode* deleteNode(ListNode* head, int val) {
        if (head->val == val)
            return head->next;
        if (head == NULL)
            return head;
        ListNode* tmp = head;
        while (tmp->next->val != val) {
            tmp = tmp->next;
        }
        tmp->next = tmp->next->next;
        return head;
    }
};

int main() {
    cout << "Hello, World!";
    // Solution()
    return 0;
}